<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <%- include common %>
        <title>
            <%- title %>
        </title>
        <style>
            body {
                font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
                font-size: 14px;
                line-height: 1.42857143;
                color: #333;
            }

            header {
                background-color: rgb(185, 184, 184);
            }

            header .btn {
                margin-left: 10px;
                margin-top: 4px;
                margin-bottom: 4px;
            }

            td {
                padding: 9px 15px;
                min-height: 20px;
                line-height: 20px;
                border: 1px solid #e2e2e2;
                font-size: 14px;
            }

            tr {
                border-spacing: 0;
                border-collapse: collapse;
            }
        </style>
</head>

<body>
    <%- include("head") %>
        <div class="container-fluid">
            <header>
                <button class="btn btn-warning">批量删除</button>
                <button class="btn btn-info"> 添加车位</button>
            </header>
            <table>
                <thead>
                    <tr>
                        <td>
                            <input type="checkbox" id="checkAll">
                        </td>
                        <td>ID</td>
                        <td>所属小区</td>
                        <td>车位编号</td>
                        <td>车位名称</td>
                        <td>状态</td>
                        <td>修改</td>
                        <td>删除</td>
                    </tr>
                </thead>
                <tbody>
                    <% if(data.length>0){ %>
                        <% data.forEach((item,index)=>{ %>

                            <tr>
                                <td>
                                    <input type="checkbox" id="<%- item._id %>">
                                </td>
                                <td>
                                    <%- index+1 %>
                                </td>
                                <td>
                                    <%- item.area %>
                                </td>
                                <td>
                                    <%- item.parklotId %>
                                </td>
                                <td>
                                    <%- item.parklotName %>
                                </td>
                                <td>
                                    <button style="width: 70px;" class="btn btn-primary">
                                        <%- item.status?'空闲':'使用中' %>
                                    </button>
                                </td>
                                <td><a href="">修改</a></td>
                                <td><a href="/car/delOne?_id=<%- item._id%>">删除</a></td>
                            </tr>
                            <% })} %>

                </tbody>
            </table>
        </div>
        //添加车辆数据库

        <%- include footer %>
</body>

</html>